<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    
    <title><?php echo C('WEB_SITE_TITLE');?></title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    
    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="/Admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/Admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/Admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/Admin/css/animate.min.css" rel="stylesheet">
    <link href="/Admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    
    <script src="/Admin/js/jquery.min.js?v=2.1.4"></script>

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5><?php echo ($title); ?></h5>
        </div>
        <div class="ibox-content">
            <div class="row row-lg">
            <div class="col-sm-12">
                <script>
    $(function(){
        $(".alert").on('click',function(){
            console.log("tap");
            $(this).remove();
        });
    })
</script>
<?php switch($alert["status"]): case "0": ?><div class="alert alert-danger" style="text-align:center;"><?php echo ($alert["msg"]); ?></div><?php break;?>
    <?php case "1": ?><div class="alert alert-success" style="text-align:center;"><?php echo ($alert["msg"]); ?></div><?php break; endswitch;?>
                <div class="clearfix" style="width:100%;">
                    <div class="bars pull-left">
                        <div class="btn-group hidden-xs" id="exampleTableEventsToolbar" role="group">
                            <button type="button" class="btn btn-outline btn-default" href="<?php echo U('District/index');?>" style="padding-bottom: 8px;padding-top: 8px;">
                                <i class="glyphicon glyphicon-chevron-left" aria-hidden="true"></i>
                            </button>
                            <button type="button" class="btn btn-outline btn-default" href="<?php echo U('District/edit');?>" style="padding-bottom: 8px;padding-top: 8px;">
                                <i class="glyphicon glyphicon-plus" aria-hidden="true"></i>
                            </button>
                            <button class="btn btn-default btn-outline" type="button" name="refresh" title="刷新" href="/admin.php/District/edit.html" style="padding-bottom: 8px;padding-top: 8px;">
                                <i class="glyphicon glyphicon-repeat"></i>
                            </button>
                            <button type="button" class="btn btn-outline btn-default confirm" href="<?php echo U('District/delete',['id'=>$info['id']]);?>" style="padding-bottom: 8px;padding-top: 8px;">
                                <i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
                            </button>
                        </div>
                    </div>
                </div>
    
                <form method="post" action="<?php echo U('District/edit');?>" class="form-horizontal">
        
        
        
                    <div class="hr-line-dashed"></div>
        
                    <div class="form-group">
                        <label class="col-sm-2 control-label">地区名称</label>
                        <div class="col-sm-10">
                            <input name="title" type="text" class="form-control" value="<?php echo ((isset($info["title"]) && ($info["title"] !== ""))?($info["title"]):''); ?>">
                            <span class="help-block m-b-none"></span>
                        </div>
                    </div>
        
                    <input type="hidden" name="id" value="<?php echo ((isset($info["id"]) && ($info["id"] !== ""))?($info["id"]):''); ?>"/>
        
        
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <button class="btn btn-primary" type="submit">保存内容</button>
                            <button class="btn btn-white" type="submit" onclick="window.history.go(-1);">取消</button>
                        </div>
                    </div>
                </form>
            </div>
            
            </div>
        </div>
    </div>
    <!-- End Panel Other -->
</div>

<!--<script src="/Admin/js/jquery.min.js?v=2.1.4"></script>-->
<script src="/Admin/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/Admin/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/Admin/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/Admin/js/plugins/layer/layer.min.js"></script>
<script src="/Admin/js/hplus.min.js?v=4.1.0"></script>
<script src="/Admin/js/contabs.min.js"></script>
<script src="/Admin/js/plugins/pace/pace.min.js"></script>
<script>
    $("button").on('click',function(){
        if ( $(this).hasClass("confirm") ) {
            if ( !confirm("确定要执行操作吗?") ) {
                console.log("取消操作");
                return;
            } else {
                console.log("继续操作");
            }
        }
        var href = $(this).attr("href");
        var form = $(this).attr("form");
        var action = $(this).attr("action");
        if ( href ){
            window.location.href = href;
        } else if ( form && action ) {
            $("#"+form)
                .attr("action",action)
                .submit();
        }
    });

    $("input[name=checkAll]").on('change',function(){
        console.log("改变了");
        console.log($(this).prop("checked"));
        var child = $(this).attr("child");
        if ( $(this).prop("checked") ) {
            $("."+child).prop("checked",true);
        } else {
            $("."+child).prop("checked",false);
        }
    });

</script>

<script src="/Admin/js/content.min.js?v=1.0.0"></script>
<script src="/Admin/js/plugins/iCheck/icheck.min.js"></script>
<script src="/Admin/js/plugins/summernote/summernote.min.js"></script>
<script src="/Admin/js/plugins/summernote/summernote-zh-CN.js"></script>

<script>
    $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
    $(document).ready(function(){$(".summernote").summernote({lang:"zh-CN"})});var edit=function(){$("#eg").addClass("no-padding");$(".click2edit").summernote({lang:"zh-CN",focus:true})};var save=function(){$("#eg").removeClass("no-padding");var aHTML=$(".click2edit").code();$(".click2edit").destroy()};
</script>
</body>
</html>